﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Common.Master" AutoEventWireup="true" EnableEventValidation="false"
    CodeBehind="ArchiveDoneList.aspx.cs" Inherits="Web.Views.ArchiveFlowView.ArchiveDoneList" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script type="text/javascript" src="../../Javascript/UserControls.js"></script>
    <script type="text/javascript">
        $(function () {
            newinitTabs();

            $("#ctl00_ContentPlaceHolder1_BtnFilter").click(function () {

                var tab = $('.easyui-tabs').tabs('getSelected');
                var tabtitle = tab.panel('options').title;

                return true;
            });

            $("#btnShowFilter").click(function () {
                if ($(this).val() == '展开过滤') {
                    //$('#searchdialog').show();
                    OpenDialog();
                    $(this).val('隐藏过滤');
                }
                else {
                    //$('#searchdialog').hide();
                    HideDialog();
                    $(this).val('展开过滤');
                }

            });
        });


        //初始化tab
        function newinitTabs(selectEvent) {
            var key = $("#" + "ctl00_h_pagename").val();
            var cookieValue = getCookie(key);
            $('.easyui-tabs').tabs({
                onSelect: function (title) {
                    var tab = $('.easyui-tabs').tabs('getSelected');
                    var tabtitle = tab.panel('options').title;
                    addCookie(key, tabtitle, 0);
                    //额外增加的处理事件(原有的事件处理  ----start)

                    //当前档案类型
                    var archiveType = getQueryStringValue("archiveType");

                    if (title == "待办结条目-未生成档号") {
                        //退回隐藏，其他显示
                        $("#ctl00_ContentPlaceHolder1_btnGenerateArchiveCode").show();
                        $("#ctl00_ContentPlaceHolder1_btnDeleteArchiveCode").hide();
                        $("#ctl00_ContentPlaceHolder1_btnVerify").hide();
                        $("#ctl00_ContentPlaceHolder1_btnBack").show();
                    }
                    else if (title == "待办结条目-已生成档号") {
                        //办结显示，其他隐藏
                        $("#ctl00_ContentPlaceHolder1_btnGenerateArchiveCode").hide();
                        $("#ctl00_ContentPlaceHolder1_btnDeleteArchiveCode").show();
                        $("#ctl00_ContentPlaceHolder1_btnVerify").show();
                        $("#ctl00_ContentPlaceHolder1_btnBack").hide();
                    }
                    else if (title == "已办条目") {
                        //所有隐藏
                        $("#ctl00_ContentPlaceHolder1_btnGenerateArchiveCode").hide();
                        $("#ctl00_ContentPlaceHolder1_btnDeleteArchiveCode").hide();
                        $("#ctl00_ContentPlaceHolder1_btnVerify").hide();
                        $("#ctl00_ContentPlaceHolder1_btnBack").hide();
                    }

                    ShowCategoryBtn();

                    //文书+勘探综合类  隐藏卷内目录
                    if (archiveType == 1 || archiveType == 71
					|| archiveType == 7101 || archiveType == 7102) {
                        $("#ctl00_ContentPlaceHolder1_btnPrintBoxCatagory").show();
                    }

                    //勘探开发-单井 实物 声像 不打印盒内和卷内
                    if (archiveType == 72 || archiveType == 9 || archiveType == 91 || archiveType == 92
            || archiveType == 93 || archiveType == 94 || archiveType == 8 || archiveType == 81
            || archiveType == 82 || archiveType == 83) {
                        $("#ctl00_ContentPlaceHolder1_btnPrintJuanCatagory").hide();
                        $("#ctl00_ContentPlaceHolder1_btnPrintBoxCatagory").hide();
                    }

                    //(原有的事件处理  ----end)
                }
            }).tabs('select', cookieValue);
        }

        function ShowCategoryBtn() {
            //卷存储的，不需要显示盒内目录打印
            //件存储的，不需要显示卷内目录打印

            var archiveBaseType = '<%= BaseArchiveType %>';

            //卷
            if (archiveBaseType == 'BulidProject' || archiveBaseType == 'Equipment'
            || archiveBaseType == 'Account' || archiveBaseType == 'Technology') 
            {
                $("#ctl00_ContentPlaceHolder1_btnPrintJuanCatagory").show();
                $("#ctl00_ContentPlaceHolder1_btnPrintBoxCatagory").hide();
            }
            else {
                $("#ctl00_ContentPlaceHolder1_btnPrintJuanCatagory").hide();
                $("#ctl00_ContentPlaceHolder1_btnPrintBoxCatagory").show();
            }
        }

    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="toolbar2">
        <button type="button" class="sexybutton" id="btnGenerateArchiveCode" runat="server"
            onserverclick="btnGenerateArchiveCode_Click">
            <span><span><span class="disk">生成档号</span></span></span></button>
        <button type="button" class="sexybutton" id="btnDeleteArchiveCode" runat="server"
            onserverclick="btnDeleteArchiveCode_Click">
            <span><span><span class="cancel">删除档号</span></span></span></button>
        <button type="button" class="sexybutton" id="btnVerify" runat="server" onserverclick="btnVerify_Click">
            <span><span><span class="disk">办结</span></span></span></button>
        <button type="button" class="sexybutton" id="btnBack" runat="server" onserverclick="btnBack_Click">
            <span><span><span class="cancel">退回</span></span></span></button>
        <button type="button" class="sexybutton" id="btnPrintArchiveMenu" runat="server"
            onserverclick="btnPrintArchiveMenu_Click">
            <span><span><span class="disk">打印企业档案目录</span></span></span></button>
        <button type="button" class="sexybutton" id="btnPrintHandoverCatagory" runat="server"
            onserverclick="btnPrintHandoverCatagory_Click">
            <span><span><span class="disk">打印档案交接文据</span></span></span></button>
        <button type="button" class="sexybutton" id="btnPrintJuanCatagory" runat="server"
            onserverclick="bnPrintJuanCatagory_Click">
            <span><span><span class="disk">打印卷内目录</span></span></span></button>
        <button type="button" class="sexybutton" id="btnPrintBoxCatagory" runat="server"
            onserverclick="bnPrintBoxCatagory_Click">
            <span><span><span class="disk">打印盒内目录</span></span></span></button>
        <button type="button" class="sexybutton" id="btnPrintBeikaoTable" runat="server"
            onserverclick="btnPrintBeikaoTable_Click">
            <span><span><span class="disk">打印备考表</span></span></span></button>
        <button type="button" class="sexybutton" id="btnShowFilter"  >展开过滤</button>
    </div>
    <ep:searchControl id="sch" runat="server" SearchEvent="sch_SearchEvent"></ep:searchControl>
    <div id="tt" class="easyui-tabs" border="false">
        <div title="待办结条目-未生成档号">
            <div class="toolbar">
                <table>
                    <tr>
                        <td>
                            当前分类档号流水号：
                        </td>
                        <td>
                            <asp:TextBox runat="Server" ID="txtArchiveCodeNumber"></asp:TextBox>
                        </td>
                    </tr>
                </table>
            </div>
            <div style="overflow: hidden;">
                <h3>
                    待办结条目-未生成档号</h3>
                <ep:EPGridView ID="gvDocumentUndoWithNoArchiveNum" DataKeyNames="DataID" runat="server"
                    Width="100%" ShowCheckBox="true" OnRowDataBound="gvNewUnTransfered_RowDataBound"
                    OnRowEditing="gvUntransferedWithNoArchiveNum_RowEditing">
                    <Columns>
                        <asp:BoundField DataField="DATAID" HeaderStyle-Width="2%" ItemStyle-HorizontalAlign="Center" /> 
                        <asp:CommandField ButtonType="Button" ControlStyle-CssClass="btn" EditText="编辑" ShowEditButton="true"
                            HeaderText="操作" HeaderStyle-Width="5%" ItemStyle-HorizontalAlign="Center" />
                        <asp:BoundField HeaderText="档号" DataField="ARCHIVENUM" HeaderStyle-Width="10%" ItemStyle-HorizontalAlign="Center" />
                        <asp:BoundField HeaderText="提交人" DataField="CREATEUSERID" HeaderStyle-Width="5%"
                            ItemStyle-HorizontalAlign="Center" />
                        <asp:BoundField HeaderText="题名" DataField="TITLE" HeaderStyle-Width="20%" ItemStyle-HorizontalAlign="Left" />
                        <asp:BoundField HeaderText="归档单位" DataField="FILEORGID" HeaderStyle-Width="8%" ItemStyle-HorizontalAlign="Center" />
                        <asp:BoundField HeaderText="责任者" DataField="PUBLISHER" HeaderStyle-Width="5%" ItemStyle-HorizontalAlign="Center" />
                        <asp:BoundField HeaderText="正本数量" DataField="MAINBODYNUM" HeaderStyle-Width="2%" ItemStyle-HorizontalAlign="Center" />
                        <asp:BoundField HeaderText="件数" DataField="PAGEFILENUM" HeaderStyle-Width="2%" ItemStyle-HorizontalAlign="Center" />
                        <asp:BoundField HeaderText="密级" DataField="F_SECURITYTYPE" HeaderStyle-Width="4%"
                            ItemStyle-HorizontalAlign="Center" />
                        <asp:BoundField HeaderText="日  期" DataField="publishtime" HeaderStyle-Width="8%" ItemStyle-HorizontalAlign="Center">
                        </asp:BoundField>
                        <asp:BoundField HeaderText="电子文件数" DataField="F_KEEPTIME" HeaderStyle-Width="2%" ItemStyle-HorizontalAlign="Center">
                        </asp:BoundField>
                    </Columns>
                </ep:EPGridView>
                <ep:AspNetPager SubmitButtonText=" GO " ID="pagerUndoWithNoArchiveNum" Height="26px"
                    Width="100%" CssClass="yahoo2" runat="server" PageSize="10" LayoutType="Table"
                    ShowCustomInfoSection="Right" CustomInfoClass="custom" CustomInfoStyle=" clear:both;"
                    ShowPageIndexBox="Always" SubmitButtonImageUrl="../Images/go.png" ShowPageIndex="true"
                    PageIndexBoxType="TextBox" CustomInfoHTML="第 %CurrentPageIndex% 页，共 %PageCount% 页，每页显示 %PageSize% 条，共 %RecordCount% 条"
                    OnPageChanging="pagerUntransferedWithNoArchiveNum_PageChanging" AlwaysShow="false">
                </ep:AspNetPager>
            </div>
        </div>
        <div title="待办结条目-已生成档号">
            <div style="overflow: hidden;">
                <h3>
                    待办结条目-已生成档号</h3>
                <ep:EPGridView ID="gvDocumentUndo" DataKeyNames="DataID" runat="server" Width="100%"
                    OnRowDataBound="gvUnTransfered_RowDataBound" ShowCheckBox="true" OnRowEditing="gvUnTransfered_RowEditing">
                    <Columns>
                        <asp:BoundField DataField="DATAID" HeaderStyle-Width="2%" ItemStyle-HorizontalAlign="Center" /> 
                        <asp:CommandField ButtonType="Button" ControlStyle-CssClass="btn" EditText="编辑" ShowEditButton="true"
                            HeaderText="操作" HeaderStyle-Width="10%" ItemStyle-HorizontalAlign="Center" />
                        <asp:BoundField HeaderText="档号" DataField="ARCHIVENUM" HeaderStyle-Width="7%" ItemStyle-HorizontalAlign="Center" />
                        <asp:BoundField HeaderText="提交人" DataField="CREATEUSERID" HeaderStyle-Width="10%"
                            ItemStyle-HorizontalAlign="Center" />
                        <%--<asp:HyperLinkField HeaderText="文件名" DataTextField="TITLE" DataNavigateUrlFormatString="ArchiveFlowEdit.aspx?archiveId={0}&archivetype=1"
                    DataNavigateUrlFields="DataID" HeaderStyle-Width="20%" />--%>
                        <asp:BoundField HeaderText="题名" DataField="TITLE" HeaderStyle-Width="20%" ItemStyle-HorizontalAlign="Left" />
                        <asp:BoundField HeaderText="立卷单位" DataField="FILEORGID" HeaderStyle-Width="8%" ItemStyle-HorizontalAlign="Center" />
                        <asp:BoundField HeaderText="来源" DataField="ARCHIVESOURCE" DataFormatString="{0:yyyy-MM-dd}"
                            HtmlEncode="false" HeaderStyle-Width="10%" ItemStyle-HorizontalAlign="Center" />
                        <asp:BoundField HeaderText="密级" DataField="F_SECURITYTYPE" HeaderStyle-Width="7%"
                            ItemStyle-HorizontalAlign="Center" />
                        <asp:BoundField HeaderText="入库日期" DataField="CREATETIME" DataFormatString="{0:yyyy-MM-dd}"
                            HeaderStyle-Width="10%" ItemStyle-HorizontalAlign="Center" />
                    </Columns>
                </ep:EPGridView>
                <ep:AspNetPager SubmitButtonText=" GO " ID="pagerUndo" Height="26px" Width="100%"
                    CssClass="yahoo2" runat="server" PageSize="10" LayoutType="Table" ShowCustomInfoSection="Right"
                    CustomInfoClass="custom" CustomInfoStyle=" clear:both;" ShowPageIndexBox="Always"
                    SubmitButtonImageUrl="../Images/go.png" ShowPageIndex="true" PageIndexBoxType="TextBox"
                    CustomInfoHTML="第 %CurrentPageIndex% 页，共 %PageCount% 页，每页显示 %PageSize% 条，共 %RecordCount% 条"
                    OnPageChanging="pagerUntransfered_PageChanging" AlwaysShow="false">
                </ep:AspNetPager>
            </div>
        </div>
        <div title="已办条目" style="overflow: visible;">
            <div style="overflow: hidden;">
                <h3>
                    已办条目</h3>
                <ep:EPGridView ID="gvDocumentDone" DataKeyNames="DataID" runat="server" ShowCheckBox="true"
                    Width="100%" OnRowDataBound="gvTransfered_RowDataBound">
                    <Columns>
                        <asp:BoundField DataField="DATAID" HeaderStyle-Width="2%" ItemStyle-HorizontalAlign="Center" /> 
                        <asp:BoundField HeaderText="档号" DataField="ARCHIVENUM" HeaderStyle-Width="10%" ItemStyle-HorizontalAlign="Center" />
                        <asp:BoundField HeaderText="提交人" DataField="CREATEUSERID" HeaderStyle-Width="10%"
                            ItemStyle-HorizontalAlign="Center" />
                        <asp:BoundField HeaderText="题名" DataField="TITLE" HeaderStyle-Width="18%" ItemStyle-HorizontalAlign="Left" />
                        <asp:BoundField HeaderText="立卷单位" DataField="FILEORGID" HeaderStyle-Width="8%" ItemStyle-HorizontalAlign="Center" />
                        <asp:BoundField HeaderText="入库日期" DataField="CREATETIME" DataFormatString="{0:yyyy-MM-dd}"
                            HtmlEncode="false" HeaderStyle-Width="10%" ItemStyle-HorizontalAlign="Center" />
                        <asp:BoundField HeaderText="密级" DataField="F_SECURITYTYPE" HeaderStyle-Width="7%"
                            ItemStyle-HorizontalAlign="Center" />
                        <asp:BoundField HeaderText="来源" DataField="ARCHIVESOURCE" HeaderStyle-Width="10%"
                            ItemStyle-HorizontalAlign="Center" />
                    </Columns>
                </ep:EPGridView>
                <ep:AspNetPager SubmitButtonText=" GO " ID="pagerDone" Height="26px" Width="100%"
                    CssClass="yahoo2" runat="server" PageSize="10" LayoutType="Table" ShowCustomInfoSection="Right"
                    CustomInfoClass="custom" CustomInfoStyle=" clear:both;" ShowPageIndexBox="Always"
                    SubmitButtonImageUrl="../Images/go.png" ShowPageIndex="true" PageIndexBoxType="TextBox"
                    CustomInfoHTML="第 %CurrentPageIndex% 页，共 %PageCount% 页，每页显示 %PageSize% 条，共 %RecordCount% 条"
                    OnPageChanging="pagerTransfered_PageChanging" AlwaysShow="false">
                </ep:AspNetPager>
            </div>
        </div>
    </div>
    <asp:HiddenField ID="hiddenSHTG" runat="server" Value="办结" />
    <asp:HiddenField ID="hiddenBack" runat="server" Value="办结审核退回" />
    <asp:HiddenField ID="hiddenStatusName" runat="server" Value="办结审核中" />
</asp:Content>
